#{extends 'frame.html' /}
#{set title:'我的任务' /}

#{set 'moreStyles'}
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/task/sellerTasks.css'}" />
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/datePicker.css'}" />
#{/set}
<div class="contentCard">
	<div class="contentTitle">
	<span class="floatRight mr20">
		<a href="/task/publish-wd" class="red">
		<em class="iconfont">&#xf0199;</em>我要发任务</a>
	</span>
	<span class="floatLeft">待处理任务</span>
	
	</div>
	<div class="contentBody">
		<div class="overview-wrapper clearfix">
			<div class="overview-box floatLeft">
				<div class="caption secondTile">平台审核中</div>
				#{if statusStatiscisList?.get('EXAMINE_STATUS_LIST')}
				<div class="num-list">
					#{list items:statusStatiscisList.get('EXAMINE_STATUS_LIST'), as:'vo'}
					<a href="javascript:void(0);" class="item" style="color:red"  onclick="loadExamineTask('${vo.status}')">
						<span>${vo.status.title}</span> <strong>${vo.count}</strong>
					</a>
					#{/list}
				</div>
				#{/if}
				#{else}
				<div class="no-data">暂无待处理的任务</div>
				#{/else}
				<div class="info">
					<span class="iconfont">&#xf0142;</span>
					审核时间早上9点到晚上9点，审核不通过请根据提示修改
				</div>
			</div>
			<div class="overview-box floatLeft">
				<div class="caption secondTile">买手已完成分享，待审核</div>
				#{if waitCheckShareTaskStatiscs>0}
				<div class="num-list">
					<a href="/task/shareTask/wait_check" class="item" style="color:red">
						<span>分享待审核</span> <strong>${waitCheckShareTaskStatiscs}</strong>
					</a>
				</div>
				#{/if}
				#{else}
				<div class="no-data">暂无待处理的任务</div>
				#{/else}
				<div class="info">
					<span class="iconfont">&#xf0142;</span>
					请尽快审核相关任务
				</div>
			</div>
			<div class="overview-box floatLeft">
				<div class="caption secondTile">买手已提交分销订单，待审核</div>
				#{if waitCheckOrderTaskStatiscs>0}
				<div class="num-list">
					<a href="/task/orderTask/wait_check" class="item" style="color:red"  onclick="">
						<span>待审核的订单</span> <strong>${waitCheckOrderTaskStatiscs}</strong>
					</a>
				</div>
				#{/if}
				#{else}
				<div class="no-data">暂无待处理的任务</div>
				#{/else}
				<div class="info">
					<span class="iconfont">&#xf0142;</span>
					请尽快审核相关任务
				</div>
			</div>
		</div>
	</div>
</div>

<div class="contentCard">
	<div class="contentTitle">任务进展</div>
	<div class="tabSwitchWrapper">
		<a class="tab-cell chargeTypeTab focus" href="javascript:;" data-status="PROCESS" for="processingTask">进行中的任务</a>
		<a class="tab-cell chargeTypeTab" href="javascript:;" data-status="FINISHED" for="finishedTask">已完成的任务</a>
		<a class="tab-cell chargeTypeTab" href="javascript:;" data-status="CANCLED" for="cancelTask">已经取消的任务</a>
		<a class="tab-cell chargeTypeTab" href="javascript:;" data-status="ALL" for="allTask">全部任务</a>
	</div>
	<div class="taskFilterPanel mt10">
		<span class="floatLeft mr-8">任务状态</span>
		<select class="floatLeft mr-8" id="status">
			<option value="">全部</option>
			#{list items:sellerStatusList,as:'sellerStatus'}
			<option value="${sellerStatus}">${sellerStatus.title}</option>
			#{/list}
		</select>
		<span class="floatLeft mr10">商品名称</span>
		<input type="text" id="itemTitle" class="floatLeft mr10 inputText" />
		<span class="floatLeft mr10">任务号</span>
		<input type="text" id="taskNo" class="floatLeft mr10 inputText" />
	</div>
	<div class="cal-content taskFilterPanel mb10">
		<span class="floatLeft mr10">发布时间</span>
		<span class="floatLeft mr10 cal-date-input">
			<input class="inputDate start-date" id="publishTimeStart" readonly="readonly" value=""  />
		</span>
		<span class="floatLeft mr10 med-cal-split">-</span>
		<span class="floatLeft mr10 cal-date-input">
			<input class="inputDate end-date" id="publishTimeEnd" readonly="readonly" value="" />
		</span>
		<a class="stdColorButton floatLeft" id="queryBtn" href="javascript:;" style="height:20px;">查询</a>
	</div>
	
	<div>
		<div class="taskWrapper" style="overflow: hidden;" id="taskContainer"></div>
		<div class="pagin-btm clearFix ml20">
			<div class="pagination"></div>
		</div>
		<!--这里是分页区域-->
		<div class="taskPagination"></div>

		<div class="popWrapper" style="display: none;" id="tr_loading_mask">
			<div class="maskLayer"></div>
			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />
		</div>
	</div>
</div>

<!--Cancel window-->
<div class="popWrapper" id="cancelWnd">
	<div class="maskLayer"></div>
	<div class="modalWnd">
		<a href="javascript:;" class="wnd_Close_Icon" title="关闭窗口"></a>
		<h3 class="topTile">撤销未接单任务</h3>
		<div class="modalWndInner">
			<div class="content-info">
				<p>
					<span class="mr-4">当前任务还有</span>
					<span class="red mr-4 cancledNum">1</span>
					<span>单未接手</span>
					<br/>
					<span class="mr-4">撤销将解冻押金</span>
					<span class="red mr-4 cancledPledge">112</span>
					<span class="mr-4">元，退回金币</span>
					<span class="red mr-4 cancledIngot">112</span>
					<span>个</span>
				</p>

			</div>

		</div>
		<div class="wndBotButtonSection">
			<a href="javascript:;" class="botButton btnPay">确认</a>
		</div>
	</div>
</div>
<!--Task Template-->
<textarea id="taskCellTemp" class="muban">
	{{#results}}
	<div class="taskCell">
		<div class="title clearfix">
			<span class="operation">
				<!-- 	<a class="boost btn mr-8" href="javascript:;" speedTaskIngot="{{speedTaskIngot}}" currId="{{taskId}}">
				<span class="iconfont">&#xf00fe;</span>
				加快任务完成速度
			</a>
			-->
		</span>
		<span class="taskNo floatLeft mr-4">
			任务编号：
			<span>{{taskId}}</span>
		</span>
		<a target="_blank" href="/seller/wdTask/{{taskId}}" class="floatLeft view-detail  mr-20">【详情】</a>
		<span class="floatLeft mr-4">
			任务状态：
			<span class="{{status}}">{{statusTitle}}</span>
		</span class="floatLeft mr-4">
		<span>发布时间：
		<span class="{{status}}">{{pubTime}}</span></span>
	</div>
	<div class="body">
		<table class="normTable">
			<thead>
				<tr>
					<td class="item-list"></td>
					<td class="doing"></td>
					<td class="express"></td>
					<td class="opera">
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="item-list">
						<div class="item-box">
							<div class="pic">
								<img src="{{itemPic}}" />
							</div>
							<p class="title tl">
								{{itemTitle}}
							</p>
						</div>
						{{#additionalItemPicUrl}}
						<div class="item-box">
							<div class="pic">
								<img src="{{additionalItemPicUrl}}" />
							</div>
							<p class="title">{{additionalItemTitle}}</p>
						</div>
						{{/additionalItemPicUrl}}
					</td>
					<td> 
						<em class="cap">未接单：<span class="waiting">{{notTakenCount}}</span></em>
						<em class="cap">进行中：<span class="doing">{{performingCount}}</span></em>
						<em class="cap">已完成：<span class="finished">{{finishedCount}}</span></em>
					</td>
					<td class="express" style="color:red">
						{{remarkStr}}
					</td>
					<td class="opera">
					{{#isRealTask}}
						<a class="btnRepublish stdColorButton" href="/task/republishWdTask/{{taskId}}" target="_blank">一键发布</a>
					{{/isRealTask}}
					{{#isWaitingPay}}
						<a class="btnRepublish stdColorButton" href="/task/publish/editWdTask/{{taskId}}" target="_blank">继续支付</a>
					{{/isWaitingPay}}
		            {{#isWaitEdit}}
		            	<a class="btnRepublish stdColorButton" href="/task/publish/editWdTask/{{taskId}}" target="_blank">继续编辑</a>
		            {{/isWaitEdit}}
					{{#cancelFlag}}
						<a class="btnRepublish stdColorButton cancel btn" href="javascript:;" taskId="{{taskId}}" target="_blank">撤销任务</a>
					{{/cancelFlag}}
					</td>
				</tr>
			</tbody>
		</table>

	</div>
</div>
{{/results}}
</textarea>
#{set 'moreScripts'}
<script src="@{'/public/javascripts/date.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.datePicker.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/task/sellerWdTasks.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>
<script type="text/javascript">
	App.module = 'myWdTask';
</script>
#{/set}